str05 = "python"
print(len(str05))  # 获取字符串的长度  6
print("pyt" in str05, "pyh" not in str05)
print("hello" + "world")  # helloworld
print("hello" * 3)  # 表示字符串连续出现n次

print(str05[:-1:2])  # pto
print(str05[1::4])  # yn
print(str05[1::2])  # yhn
print(str05[1:4])  # yth
print(str05[::-1])  # nohtyp
# 开头不写从头切，终止不写切到尾
print(str05[0:4], str05[:4])  # pyth
print(str05[3:100], str05[3:])  # hon
print(str05[:])  # 从头切到尾  python


# print(str05[6])  # 报错:索引越界
print(str05[0],str05[-6])  # p p 
print(str05[-1], str05[5]) # n n
# y t h o
print(str05[1], str05[-5])  # y y
print(str05[2], str05[-4])  # t t
print(str05[3], str05[-3])  # h h
print(str05[4], str05[-2])  # o o




str01 = "hello, nfx, hehe~~~"
print(str01)
# 符号冲突
str02 = 'hello, "nfx", hehe~~~'
print(str02)
# hello, "nfx', hehe~
# 三引号: 符号冲突
str03 = """hello, "nfx', hehe~"""
print(str03)
# 原样输出: 保留原有的格式
str04 = """    见赠   nfx   
   巴山楚水凄凉地,
   baby can you kiss me~~~"""
print(str04)